//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
#ifndef _AP_Cluster_h__
#define _AP_Cluster_h__
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
class Sim_Cluster {

    private:

        int     x;
        int     y;
        double	similarity;

    public:

        Sim_Cluster();
        Sim_Cluster(int, int, double);
        Sim_Cluster(const Sim_Cluster&);
        Sim_Cluster(const Sim_Cluster*);
        
        ~Sim_Cluster();

        inline void   X(int);
        inline void   Y(int);
        inline void   Similarity(double);

        inline int    X(void);
        inline int    Y(void);
        inline double Similarity(void);

        Sim_Cluster operator=(const Sim_Cluster&);

};
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
class AP_Cluster {

    private:

        Sim_Cluster *dataPoints;
        int          numberDataPoints;
        double      *preferencePoint;
        bool         onePreference;

        int         *idx;
        int          numberCluster;

        //Parameters
        int          maxits;
        int          convits;
        double       dampfact;
        bool         noise;
        static int   cicle;

    protected:

        int CreateSimilarityFile(void);
        int CreatePreferenceFile(void);
        int LoadIdxResult(void);

    public:

        //Constructor and Destructor
        AP_Cluster();
        AP_Cluster(const AP_Cluster*);
        ~AP_Cluster();

        //Input Functions
        void DataPoints(Sim_Cluster*, int);
        void NumberDataPoints(int);
        void PreferencePoint(double*, int);
        void OnePreference(bool);
        void Idx(int*, int);
        void NumberCluster(int);

        void Maxits(int);
        void Convits(int);
        void Dampfact(double);
        void Noise(bool);

        //Output Functions
        Sim_Cluster*    DataPoints(int);
        int             NumberDataPoints(void);
        double          PreferencePoint(int);
        bool            OnePreference(void);
        int             Idx(int);
        int             NumberCluster(void);

        int             Maxits(int);
        int             Convits(int);
        double          Dampfact(double);
        double          Noise(bool);

        //Operations Funtions

        //Utilities functions
        void ComputeAP_Cluster(int);

};
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
